whisk.spi {
  SimpleSpi = whisk.spi.SimpleSpiImpl
  MissingSpi = whisk.spi.MissingImpl
  MissingModule = missing.module
}

# Blocking requests fall back to non-blocking after ~60s
akka.http.client.idle-timeout = 90 s
akka.http.host-connection-pool.idle-timeout = 90 s
akka.http.host-connection-pool.client.idle-timeout = 90 s

whisk {
    # kafka related configuration
    kafka {
        replication-factor = 1
        topics {
            KafkaConnectorTestTopic {
                segment-bytes   =  536870912
                retention-bytes = 1073741824
                retention-ms    = 3600000
            }
        }
        common {
          security-protocol: {{ kafka.protocol }}
          ssl-truststore-location: {{ openwhisk_home }}/ansible/roles/kafka/files/{{ kafka.ssl.keystore.name }}
          ssl-truststore-password: {{ kafka.ssl.keystore.password }}
          ssl-keystore-location: {{ openwhisk_home }}/ansible/roles/kafka/files/{{ kafka.ssl.keystore.name }}
          ssl-keystore-password: {{ kafka.ssl.keystore.password }}
        }
        consumer {
          max-poll-interval-ms: 10000
        }
    }

    couchdb {
        protocol = "{{ db_protocol }}"
        host     = "{{ db_host }}"
        port     = "{{ db_port }}"
        username = "{{ db_username }}"
        password = "{{ db_password }}"
        provider = "{{ db_provider }}"
        databases {
          WhiskAuth       = "{{ db.whisk.auth }}"
          WhiskEntity     = "{{ db.whisk.actions }}"
          WhiskActivation = "{{ db.whisk.activations }}"
        }
    }

    controller {
      protocol = {{ controller.protocol }}
      https {
        keystore-flavor = "{{ controller.ssl.storeFlavor }}"
        keystore-path = "{{ openwhisk_home }}/ansible/roles/controller/files/{{ controllerKeystoreName }}"
        keystore-password = "{{ controller.ssl.keystore.password }}"
        truststore-flavor = "{{ controller.ssl.storeFlavor }}"
        truststore-path = "{{ openwhisk_home }}/ansible/roles/controller/files/{{ controllerKeystoreName }}"
        truststore-password = "{{ controller.ssl.keystore.password }}"
        client-auth = "{{ controller.ssl.clientAuth }}"
      }
    }
    user-events {
        enabled = {{ user_events }}
    }
}
